import request from "@/utils/request";

const BLACK_BASE_URL = "/ipblack";

/**
 * 获取日志分页列表
 *
 * @param queryParams 查询参数
 */
export function getPage(queryParams) {
  return request({
    url: `${BLACK_BASE_URL}/page`,
    method: "get",
    params: queryParams,
  });
}

export function deleteIp(ip) {
  return request({
    url: `${BLACK_BASE_URL}`,
    method: "delete",
    params: ip,
  });
}
//添加黑名单
export function addIp(data) {
  return request({
    url: `${BLACK_BASE_URL}`,
    method: "post",
    data: data,
  });
}

//根据用户id获取黑名单
export function getByUserId() {
  return request({
    url: `${BLACK_BASE_URL}`,
    method: "get",
  });
}
